module.exports = {
  devServer: (devServerConfig) => {
    devServerConfig.headers = {
      ...devServerConfig.headers,
      'Content-Security-Policy': [
        "default-src 'self'",
        "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://hia.volcenginepaas.com chrome-extension://*",
        "connect-src 'self' http://localhost:5001 ws://localhost:* wss: https://hia.volcenginepaas.com https://*.volcenginepaas.com",
        "style-src 'self' 'unsafe-inline' https://hia.volcenginepaas.com",
        "img-src 'self' data: https: blob:",
        "font-src 'self' data: https://hia.volcenginepaas.com",
        "frame-src 'self' https://hia.volcenginepaas.com"
      ].join('; ')
    };
    return devServerConfig;
  }
};